Conditional fields #52
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @janzenisaac , this PR adds new feature. While the original logic can specify condition, but its limited to only 1 value per field, which is limited.

I've added conditional fields fieldset, where you can specify conditions per each field value. The original logic still works, but it marked as deprecated with an according message.
Additionally fixed issue where Multiselect breaks the conditions logic, as there no case for it while removing values.
Fixed the slug creation for Field Name to be as per Core logic, as currently while having additional symbols that are not numeric or letters can break the conditions logic.
Also as an part of this PR, added an logic, where "required" class is added to each required field, as out of the box Discourse doesn't provide one, while its crucial for styling changes for required fields.
This PR already has hidden required PR.